package com.pl.shiro;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Set;

/**
 * @author shent
 */
@Service("userServiceShiro")
public class UserService {
    @Resource(name = "UserMapperShiro")
    UserMapper mapper;

    public User getByUsername(String username) {
        return mapper.getByUsername(username);
    }

    public Set<String> getRolesByUsername(String username) {
        return mapper.getRolesByUsername(username);
    }

    public Set<String> getPermissionsByUsername(String username) {
        return mapper.getPermissionsByUsername(username);
    }
}
